package com.xiaoxi.xiojcodesandbox.unsafecode;

import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.List;

public class UnsafeRead {

    public static void main(String[] args) {

        String userDir = System.getProperty("user.dir");
        String filePath = userDir + File.separator + "src\\main\\resources\\application.yml";
        List<String> list = null;
        try {
            list = Files.readAllLines(Paths.get(filePath));
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
        System.out.println(list);
    }
}
